diff --git a/lab3/zad2/app/src/main/java/pl/jacekpoz/User.java b/lab3/zad2/app/src/main/java/pl/jacekpoz/User.java index 54dd073..7168309 100644 --- a/lab3/zad2/app/src/main/java/pl/jacekpoz/User.java +++ b/lab3/zad2/app/src/main/java/pl/jacekpoz/User.java @@ -19,18 +19,18 @@ public class User> { return this.dh.power(dh.getGenerator(), this.secret); } - public void setKey(T a) { + public void setKey(final T a) { this.key = this.dh.power(a, this.secret); } - public T encrypt(T m) throws IllegalArgumentException { + public T encrypt(final T m) throws IllegalArgumentException { if (this.key.isZero()) { throw new IllegalArgumentException("key must be set before encrypting"); } return (T) m.multiply(this.key); } - public T decrypt(T c) throws IllegalArgumentException { + public T decrypt(final T c) throws IllegalArgumentException { if (this.key.isZero()) { throw new IllegalArgumentException("key must be set before decrypting"); }