Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#34): use pointer #35

Merged
merged 1 commit into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ func main() {
Params: &rsa.HashedKeyGenParams{
KeyGenParams: rsa.KeyGenParams{
ModulusLength: 2048,
PublicExponent: *big.NewInt(65537),
PublicExponent: big.NewInt(65537),
},
Hash: "SHA-256",
},
Expand Down
2 changes: 1 addition & 1 deletion algorithms/rsa/rsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ type KeyGenParams struct {
// The length, in bits, of the RSA modulus
ModulusLength uint64
// The RSA public exponent
PublicExponent big.Int
PublicExponent *big.Int
}

// HashedKeyGenParams is the model of the dictionary specificationn at
Expand Down
2 changes: 1 addition & 1 deletion algorithms/rsa/rsa_oaep.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (a *oaepSubtleCrypto) generateKeyOaep(algorithm *HashedKeyGenParams, extrac
alg := &KeyAlgorithm{
name: rsaOaep,
modulusLength: algorithm.ModulusLength,
publicExponent: &algorithm.PublicExponent,
publicExponent: algorithm.PublicExponent,
HashedKeyAlgorithm: &HashedKeyAlgorithm{
Hash: algorithm.Hash,
},
Expand Down
14 changes: 7 additions & 7 deletions algorithms/rsa/rsa_oaep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestEncryptDecrypt(t *testing.T) {
Params: &HashedKeyGenParams{
KeyGenParams: KeyGenParams{
ModulusLength: 2048,
PublicExponent: *big.NewInt(65537),
PublicExponent: big.NewInt(65537),
},
Hash: "SHA-256",
},
Expand Down Expand Up @@ -69,7 +69,7 @@ func TestOaep_ExportKey(t *testing.T) {
Params: &HashedKeyGenParams{
KeyGenParams: KeyGenParams{
ModulusLength: 2048,
PublicExponent: *big.NewInt(65537),
PublicExponent: big.NewInt(65537),
},
Hash: "SHA-256",
},
Expand Down Expand Up @@ -164,7 +164,7 @@ func TestOaep_GenerateKey(t *testing.T) {
Params: &HashedKeyGenParams{
KeyGenParams: KeyGenParams{
ModulusLength: 2048,
PublicExponent: *big.NewInt(65537),
PublicExponent: big.NewInt(65537),
},
Hash: "SHA-256",
},
Expand Down Expand Up @@ -219,7 +219,7 @@ func TestOaep_GenerateKey(t *testing.T) {
Params: &HashedKeyGenParams{
KeyGenParams: KeyGenParams{
ModulusLength: 2048,
PublicExponent: *big.NewInt(65536),
PublicExponent: big.NewInt(65536),
},
Hash: "SHA-256",
},
Expand All @@ -235,7 +235,7 @@ func TestOaep_GenerateKey(t *testing.T) {
Params: &HashedKeyGenParams{
KeyGenParams: KeyGenParams{
ModulusLength: 2048,
PublicExponent: *big.NewInt(65537),
PublicExponent: big.NewInt(65537),
},
Hash: "SHA-256",
},
Expand All @@ -251,7 +251,7 @@ func TestOaep_GenerateKey(t *testing.T) {
Params: &HashedKeyGenParams{
KeyGenParams: KeyGenParams{
ModulusLength: 2048,
PublicExponent: *big.NewInt(65537),
PublicExponent: big.NewInt(65537),
},
Hash: "SHA-256",
},
Expand All @@ -269,7 +269,7 @@ func TestOaep_ImportKey(t *testing.T) {
Params: &HashedKeyGenParams{
KeyGenParams: KeyGenParams{
ModulusLength: 2048,
PublicExponent: *big.NewInt(65537),
PublicExponent: big.NewInt(65537),
},
Hash: "SHA-256",
},
Expand Down
2 changes: 1 addition & 1 deletion examples/rsaoaep/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func main() {
Params: &rsa.HashedKeyGenParams{
KeyGenParams: rsa.KeyGenParams{
ModulusLength: 2048,
PublicExponent: *big.NewInt(65537),
PublicExponent: big.NewInt(65537),
},
Hash: "SHA-256",
},
Expand Down
Loading