equal
deleted
inserted
replaced
187 |
187 |
188 if (secret == null) { |
188 if (secret == null) { |
189 throw new IllegalStateException("Not initialized correctly"); |
189 throw new IllegalStateException("Not initialized correctly"); |
190 } |
190 } |
191 int secretLen = this.secret.length; |
191 int secretLen = this.secret.length; |
192 if (offset + secretLen > sharedSecret.length) { |
192 if (secretLen > sharedSecret.length - offset) { |
193 throw new ShortBufferException("Need " + secretLen |
193 throw new ShortBufferException("Need " + secretLen |
194 + " bytes, only " + (sharedSecret.length - offset) |
194 + " bytes, only " + (sharedSecret.length - offset) |
195 + " available"); |
195 + " available"); |
196 } |
196 } |
197 |
197 |