mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 06:39:54 +01:00
Fixed a moronic arithmetic mistake that was causing key parsing errors.
This commit is contained in:
@@ -28,7 +28,7 @@ class Sec1KeyParser implements KeyParser {
|
|||||||
this.params = params;
|
this.params = params;
|
||||||
this.modulus = modulus;
|
this.modulus = modulus;
|
||||||
this.keyBits = keyBits;
|
this.keyBits = keyBits;
|
||||||
bytesPerInt = keyBits + 7 / 8;
|
bytesPerInt = (keyBits + 7) / 8;
|
||||||
publicKeyBytes = 1 + 2 * bytesPerInt;
|
publicKeyBytes = 1 + 2 * bytesPerInt;
|
||||||
privateKeyBytes = bytesPerInt;
|
privateKeyBytes = bytesPerInt;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class Sec1PrivateKey implements PrivateKey {
|
|||||||
|
|
||||||
Sec1PrivateKey(ECPrivateKeyParameters key, int keyBits) {
|
Sec1PrivateKey(ECPrivateKeyParameters key, int keyBits) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
bytesPerInt = keyBits + 7 / 8;
|
bytesPerInt = (keyBits + 7) / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] getEncoded() {
|
public byte[] getEncoded() {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class Sec1PublicKey implements PublicKey {
|
|||||||
|
|
||||||
Sec1PublicKey(ECPublicKeyParameters key, int keyBits) {
|
Sec1PublicKey(ECPublicKeyParameters key, int keyBits) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
bytesPerInt = keyBits + 7 / 8;
|
bytesPerInt = (keyBits + 7) / 8;
|
||||||
publicKeyBytes = 1 + 2 * bytesPerInt;
|
publicKeyBytes = 1 + 2 * bytesPerInt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user