

const require_TypedArrayEncoder = require('../../../../../utils/TypedArrayEncoder.js');
require('../../../../../utils/index.js');

//#region src/modules/kms/jwk/kty/rsa/rsaPublicKey.ts
function rsaPublicJwkToPublicKey(publicJwk) {
	return {
		modulus: Uint8Array.from(require_TypedArrayEncoder.TypedArrayEncoder.fromBase64(publicJwk.n)),
		exponent: Uint8Array.from(require_TypedArrayEncoder.TypedArrayEncoder.fromBase64(publicJwk.e))
	};
}
function rsaPublicKeyToPublicJwk(options) {
	return {
		kty: "RSA",
		n: require_TypedArrayEncoder.TypedArrayEncoder.toBase64URL(options.modulus),
		e: require_TypedArrayEncoder.TypedArrayEncoder.toBase64URL(options.exponent)
	};
}

//#endregion
exports.rsaPublicJwkToPublicKey = rsaPublicJwkToPublicKey;
exports.rsaPublicKeyToPublicJwk = rsaPublicKeyToPublicJwk;