mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +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.modulus = modulus;
|
||||
this.keyBits = keyBits;
|
||||
bytesPerInt = keyBits + 7 / 8;
|
||||
bytesPerInt = (keyBits + 7) / 8;
|
||||
publicKeyBytes = 1 + 2 * bytesPerInt;
|
||||
privateKeyBytes = bytesPerInt;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class Sec1PrivateKey implements PrivateKey {
|
||||
|
||||
Sec1PrivateKey(ECPrivateKeyParameters key, int keyBits) {
|
||||
this.key = key;
|
||||
bytesPerInt = keyBits + 7 / 8;
|
||||
bytesPerInt = (keyBits + 7) / 8;
|
||||
}
|
||||
|
||||
public byte[] getEncoded() {
|
||||
|
||||
@@ -16,7 +16,7 @@ class Sec1PublicKey implements PublicKey {
|
||||
|
||||
Sec1PublicKey(ECPublicKeyParameters key, int keyBits) {
|
||||
this.key = key;
|
||||
bytesPerInt = keyBits + 7 / 8;
|
||||
bytesPerInt = (keyBits + 7) / 8;
|
||||
publicKeyBytes = 1 + 2 * bytesPerInt;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user